package cn.legend.travel.destination.main.dao.persist.mapper;


import cn.legend.travel.common.pojo.po.DistrictSimplePO;
import cn.legend.travel.destination.main.pojo.entity.District;
import cn.legend.travel.destination.main.pojo.vo.DistrictVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 处理省市区数据的Mapper接口
 *
 * @author java@tedu.cn
 * @version 1.0
 */
@Repository
public interface DistrictMapper extends BaseMapper<District> {

    /**
     * 根据父级查询子级地区列表
     *
     * @param pId 父级地区ID
     * @return 子级地区列表
     */
    List<DistrictSimplePO> listByParent(Long pId);
    List<DistrictSimplePO> list();
    List<DistrictSimplePO> listByDistrictId(Long destinationId);
    List<DistrictSimplePO> listFromRegion();
    List<DistrictSimplePO> listFromScenery();
    List<DistrictVO> selectListById(Long id);
    DistrictVO selectListByName(String name);


}
